package com.bigdata.spark.core.test

/**
 * @author Gerry chan
 * @version 1.0
 */
object TestMain {
  def main(args: Array[String]): Unit = {
    print1(getInt)
    println("----------------")
    print2(getInt)
  }

  def print1(f: => Int):Unit = { //传名参数
    println(f)
    println(f.getClass)
  }

  def print2(f: () => Int):Unit = {
    println(f)
    println(f.getClass)
  }

  def getInt(): Int = {
    1
  }

}
